package edu.nuc.event.service;

import edu.nuc.event.dao.PlaceMapper;
import edu.nuc.event.pojo.Place;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PlaceService {

    @Autowired
    private PlaceMapper placeMapper;

    public List<Place> findAllPlaces() {
        List<Place> placeList = placeMapper.findAllPlaces();
        return placeList;
    }

    public int findAllPlaceAccount() {
        int account = placeMapper.findAllPlaceAccount();
        return account;
    }

    public int delectplace(int id) {
        int i = placeMapper.delectplace(id);
        return i;
    }

    public int addplace(Place place) {
        int i = placeMapper.addplace(place);
        return i;
    }

    public Place selectplacebyid(int id) {
        Place place = placeMapper.selectplacebyid(id);
        return place;
    }

    public int updateplace(Place place) {
        int i = placeMapper.updateplace(place);
        return i;
    }
}
